package com.nur.noteishon;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		Button botonNuevaNota = (Button) findViewById(R.id.button1);
		botonNuevaNota.setOnClickListener(this);
		Button boton2 = (Button) findViewById(R.id.button2);
		boton2.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

	public void onClick(View v) {
		if (v.getId() == R.id.button1) {
			Intent intentNuevaNota = new Intent(getBaseContext(),
					NuevaNotaActivity.class);
			startActivity(intentNuevaNota);
		}
		if (v.getId() == R.id.button2) {
			Intent intentNuevaNota = new Intent(getBaseContext(),
					ListaNotas.class);
			startActivity(intentNuevaNota);
		}

	}
}
